﻿
@inject IPageService pService
@inject IPermissionService perService
@{
    //var lstItem = (List<PermissionEntity>)ViewData["lstItem"];
    ViewData["ResourcePermission"] = ViewData["lstItem"];
    ViewData["PageAll"] = Model;
    Layout = null;
}
@model List<PageEntity>
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    <h4 class="modal-title">设置权限</h4>
</div>
<div class="modal-body">
    <div class="row">
        <div class="jstree permission col-md-6">
            <ul>

                <li data-jstree='{"opened":true,"icon":"fa fa-sitemap"}'>
                    可用权限
                    @{
                        if (Model != null && Model.Count > 0)
                        {
                            var lstRoot = pService.GetChildTree(Model, "",true);
                            @await Html.PartialAsync("_childTree", lstRoot)
                        }
                    }
                </li>
            </ul>
        </div>
        <div class="jstree unpermission col-md-6">
            <ul>

                <li data-jstree='{"opened":true,"icon":"fa fa-sitemap"}'>
                    禁用权限
                    @{
                        if (Model != null && Model.Count > 0)
                        {
                            var lstRoot = pService.GetChildTree(Model, "",true);
                            @await Html.PartialAsync("_unchildTree", lstRoot)
                        }
                    }
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="modal-footer">

</div>
